
public class P28 {
	public static void main(String[] args) {
		int n = 1001;
		int line = (n - 1)/2;
		int sum = 1;
		int last = 1;
		
		for (int i = 1; i <= line; i++) {
			for (int j = 0; j < 4; j++) {
				last += i * 2;
				//System.out.println(last);
				sum += last;
			}
		}
		
		System.out.println(sum);
	}
}
